<template>
  <div :id="chartId" style="width: 100%;height: 300px">
  </div>
</template>

<script>
export default {
  name: "lineChart",
  props: {
    option: Object,
    chartId: String
  },
  data() {
    return {}
  },
  mounted() {
    this.initChart()
  },
  methods: {
    initChart() {
      var myChart = this.$echarts.init(document.getElementById(this.chartId))
      var option = this.option
      myChart.setOption(option)
    }
  }
}
</script>

<style scoped>

</style>
